Implement configurable color palette system#458
Merged
Conversation
Add a flexible color palette system allowing users to customize terminal output colors through semantic roles. Features include: - New Style and Palette types for ANSI color management - Three built-in palettes: DEFAULT, MONOCHROME, and HIGH_CONTRAST - Runtime palette switching via set_palette!() and reset_palette!() - Fine-grained color customization with set_color!() - Visual palette preview with show_palette() - Updated all display paths to use the active palette - Comprehensive test coverage and documentation
- Remove DocStringExtensions dependency (use TYPEDEF/TYPEDSIGNATURES directly) - Split code into separate files: page_building.jl, config_helpers.jl - Remove 'See also' references from internal helper docstrings - Update Project.toml extension dependencies - Documentation build now succeeds with updated structure
- Remove custom HTML anchor generation (_heading_anchor function) - Use simple text labels [Module], [Function], etc. instead of anchors - Add titlecase for doc type labels - Generated API pages now in docs/src/api/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces a flexible color palette system that allows users to customize terminal output colors through semantic roles.
Summary
Style(ANSI code wrapper) andPalette(complete set of display styles)DEFAULT_PALETTE- standard colors mirroring Julia REPL conventionsMONOCHROME_PALETTE- no styling for CI/logsHIGH_CONTRAST_PALETTE- bright bold variants for accessibilityset_palette!(p)- switch active palette globallyreset_palette!()- restore defaultset_color!(role, code)- fine-grained customization of single semantic rolecurrent_palette()- query active paletteshow_palette()- visual preview of active paletteshow,describe, exceptions, TestRunner) now read from the active palettedocs/src/guide/color-system.mdwith examplestest/suite/core/test_palette.jlSemantic roles
The palette defines 11 semantic roles:
name,type,value,keyword,count,label,emphasis,muted,error,warning,success. Each maps to a specific ANSI code and governs how different categories of information are rendered.Example usage
Breaking changes
None. This is a pure addition with no changes to existing behavior (default palette matches previous hardcoded colors).